<template>
  <div class="viewContain">
    <el-form :model="listQuery" size="small" label-width="100px">
      <el-row>
        <el-col :xs="{ span: 24 }" :sm="{ span: 12 }" :md="{ span: 6 }" :xl="{ span: 6 }">
          <el-form-item label="订单编号 :">
            <el-input
              v-model="listQuery.formNum"
              placeholder="请输入"
              clearable
              @keyup.enter.native="handleSearch"
            />
          </el-form-item>
        </el-col>
        <el-col :xs="{ span: 24 }" :sm="{ span: 12 }" :md="{ span: 6 }" :xl="{ span: 6 }">
          <el-form-item label-width="20px">
            <el-button size="mini" type="primary" @click="handleSearch">查询</el-button>
            <el-button size="mini" type="primary" plain @click="handleReload">重置</el-button>
          </el-form-item>
        </el-col>
        <div style="text-align:right">
          <el-button size="mini" type="primary" @click="handleBack">返回</el-button>
        </div>
      </el-row>
    </el-form>
    <el-table
      ref="table"
      fit
      stripe
      :data="tableData"
      border
      size="mini"
    >
      <el-table-column align="center" label="序号" type="index" width="50">
        <template slot-scope="scope">
          <span>{{ (listQuery.pageNo - 1) * listQuery.pageSize + scope.$index + 1 }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="formTime" align="center" label="消费日期" width="150" />
      <el-table-column prop="formNum" align="center" label="订单编号" width="150" />
      <el-table-column prop="amt" align="center" label="消费金额" />
      <el-table-column prop="addIntegration" align="center" label="新增积分" />
      <el-table-column prop="integration" align="center" label="积分消费" />
      <el-table-column prop="type" align="center" label="支付类型" />
    </el-table>
  </div>
</template>

<script>
import { commonMixin } from '@v/mixin/commonMixin.js'
import ComApiUrl from '@a/comomApi.js'
export default {
  mixins: [commonMixin],
  data() {
    return {
      comApiUrlList: new ComApiUrl('/member/api/member/getMemberDetail'),
      listQuery: {
        pageNo: 1,
        pageSize: 10,
        mobile: ''
      }
    }
  },
  mounted() {
    this.listQuery.mobile = localStorage.getItem('memberPhone')
    this.getList()
  },
  methods: {
    handleReload() {
      console.log(111)
      this.listQuery = {
        pageNo: 1,
        pageSize: 10,
        mobile: localStorage.getItem('memberPhone')
      }
      this.getList()
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
